/* 
 *   WWW.COO8.COM  
 */

package com.gm.memberShip.menu.model; 

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;


import java.util.*;
import org.apache.commons.lang.StringUtils;
 

import com.gm.memberShip.menu.model.*;
import com.gm.memberShip.menu.persistence.interfaces.*;
import com.gm.memberShip.menu.business.interfaces.*;  

/**
 * @author  JIANGCHENG
 * @version 1.0
 * @since 1.0
 */


public class Users  implements java.io.Serializable {
	private static final long serialVersionUID = 5454155825314635342L;
	
	//alias
	public static final String TABLE_ALIAS = "Users";
	public static final String ALIAS_APPLICATION_ID = "applicationId";
	public static final String ALIAS_USER_ID = "userId";
	public static final String ALIAS_USER_NAME = "userName";
	public static final String ALIAS_LOWER_NAME = "lowerName";
	public static final String ALIAS_MOBILE_ALIAS = "mobileAlias";
	public static final String ALIAS_IS_ANONYMOUS = "isAnonymous";
	public static final String ALIAS_LAST_ACTIVITY_DATE = "lastActivityDate";
	public static final String ALIAS_LOGIN_TIME = "loginTime";
	
	 
	 
	//columns START
	private java.lang.String applicationId;
	private int userId;
	private java.lang.String userName;
	private java.lang.String lowerName;
	private java.lang.String mobileAlias;
	private java.lang.Boolean isAnonymous;
	private java.util.Date lastActivityDate;
	private java.lang.Integer loginTime;
	//columns END

	public Users(){
	}

	public Users(
			int userId
	){
		this.userId = userId;
	} 
		 
	public void setApplicationId(java.lang.String value) {
		this.applicationId = value;
	}
	
	public java.lang.String getApplicationId() {
		return this.applicationId;
	}
		 
	public void setUserId(int value) {
		this.userId = value;
	}
	
	public int getUserId() {
		return this.userId;
	}
		 
	public void setUserName(java.lang.String value) {
		this.userName = value;
	}
	
	public java.lang.String getUserName() {
		return this.userName;
	}
		 
	public void setLowerName(java.lang.String value) {
		this.lowerName = value;
	}
	
	public java.lang.String getLowerName() {
		return this.lowerName;
	}
		 
	public void setMobileAlias(java.lang.String value) {
		this.mobileAlias = value;
	}
	
	public java.lang.String getMobileAlias() {
		return this.mobileAlias;
	}
		 
	public void setIsAnonymous(java.lang.Boolean value) {
		this.isAnonymous = value;
	}
	
	public java.lang.Boolean getIsAnonymous() {
		return this.isAnonymous;
	}
		 
	public void setLastActivityDate(java.util.Date value) {
		this.lastActivityDate = value;
	}
	
	public java.util.Date getLastActivityDate() {
		return this.lastActivityDate;
	}
		 
	public void setLoginTime(java.lang.Integer value) {
		this.loginTime = value;
	}
	
	public java.lang.Integer getLoginTime() {
		return this.loginTime;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("ApplicationId",getApplicationId())
			.append("UserId",getUserId())
			.append("UserName",getUserName())
			.append("LowerName",getLowerName())
			.append("MobileAlias",getMobileAlias())
			.append("IsAnonymous",getIsAnonymous())
			.append("LastActivityDate",getLastActivityDate())
			.append("LoginTime",getLoginTime())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getUserId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Users == false) return false;
		if(this == obj) return true;
		Users other = (Users)obj;
		return new EqualsBuilder()
			.append(getUserId(),other.getUserId())
			.isEquals();
	}
}

